var e = require("../@babel/runtime/helpers/objectSpread2"), t = require("../@babel/runtime/helpers/objectWithoutProperties"), r = function() {
    var r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, o = r.url, a = void 0 === o ? "" : o, i = r.param, u = void 0 === i ? {} : i, s = t(r, [ "url", "param" ]);
    wx.showLoading({
        title: "搜集中，请等待.."
    });
    Date.now();
    return new Promise(function(t, r) {
        wx.request(e(e({
            url: n(a),
            data: u,
            header: {
                "content-type": "application/json"
            }
        }, s), {}, {
            complete: function(e) {
                wx.hideLoading(), e.statusCode >= 200 && e.statusCode < 300 ? t(e.data) : r(e);
            }
        }));
    });
}, n = function(e) {
    return -1 == e.indexOf("://") && (e = "https://i.6520.wang/images/qinghua.json" + e), 
    e;
};

module.exports = {
    _get: function(e) {
        var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
        return r({
            url: e,
            param: t
        });
    },
    formatTime: function(e) {
        return e.getFullYear() + "年" + (e.getMonth() + 1) + "月" + e.getDate() + "日" + e.getHours() + "时" + e.getMinutes() + "分" + e.getSeconds() + "秒";
    }
};